Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add S3 bucket owner enforcement #694

Conversation

Tyler-2
Copy link
Contributor

@Tyler-2 Tyler-2 commented Mar 2, 2022

SUMMARY

AWS finally supports the ability to enforce object ownership such that the owner of the bucket owns all objects. This adds support for that.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

s3_bucket

ADDITIONAL INFORMATION
---
  - hosts: localhost
    tasks:
      - s3_bucket:
          name: tyler-test-123
          state: present

      - s3_bucket:
          name: tyler-test-123
          object_ownership: BucketOwnerEnforced
          state: present

      - s3_bucket:
          name: tyler-test-123
          state: absent

      - s3_bucket:
          name: tyler-test-123
          object_ownership: BucketOwnerEnforced
          state: present

      - s3_bucket:
          name: tyler-test-123
          state: absent

@ansibullbot
Copy link

@ansibullbot ansibullbot added community_review feature This issue/PR relates to a feature request integration tests/integration module module needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) tests tests labels Mar 2, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@Tyler-2 Tyler-2 force-pushed the add-object-ownership-enforcement branch from 1a832d6 to bd4cae8 Compare March 4, 2022 13:31
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@Tyler-2 Tyler-2 force-pushed the add-object-ownership-enforcement branch from b3fc72a to aef4591 Compare March 4, 2022 18:37
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

- C(BucketOwnerEnforced) - ACLs are disabled and no longer affect access permissions to your
bucket. Requests to set or update ACLs fail. However, requests to read ACLs are supported.
Bucket owner has full ownership and control. Object writer no longer has full ownership and
control.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add something like: C(BucketOwnerEnforced) has been added in amazon.aws version 3.2.0

@@ -0,0 +1,2 @@
minor_changes:
- s3_bucket - Add support for enforced bucket owner object ownership.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- s3_bucket - Add support for enforced bucket owner object ownership.
- s3_bucket - Add support for enforced bucket owner object ownership (https://github.com/ansible-collections/amazon.aws/pull/694).

@alinabuzachis alinabuzachis requested a review from markuman March 24, 2022 10:04
@alinabuzachis alinabuzachis added the backport-3 PR should be backported to the stable-3 branch label Mar 24, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@alinabuzachis alinabuzachis added the mergeit Merge the PR (SoftwareFactory) label Mar 24, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 7cf0e50 into ansible-collections:main Mar 24, 2022
@patchback
Copy link

patchback bot commented Mar 24, 2022

Backport to stable-3: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-3/7cf0e505d4a601793aa3a187abbda4448cb79234/pr-694

Backported as #735

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Mar 24, 2022
feat: Add S3 bucket owner enforcement

SUMMARY

AWS finally supports the ability to enforce object ownership such that the owner of the bucket owns all objects. This adds support for that.

ISSUE TYPE

Feature Pull Request

COMPONENT NAME

s3_bucket
ADDITIONAL INFORMATION

---
  - hosts: localhost
    tasks:
      - s3_bucket:
          name: tyler-test-123
          state: present

      - s3_bucket:
          name: tyler-test-123
          object_ownership: BucketOwnerEnforced
          state: present

      - s3_bucket:
          name: tyler-test-123
          state: absent

      - s3_bucket:
          name: tyler-test-123
          object_ownership: BucketOwnerEnforced
          state: present

      - s3_bucket:
          name: tyler-test-123
          state: absent

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Markus Bergholz <[email protected]>
(cherry picked from commit 7cf0e50)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Mar 24, 2022
[PR #694/7cf0e505 backport][stable-3] feat: Add S3 bucket owner enforcement

This is a backport of PR #694 as merged into main (7cf0e50).
SUMMARY

AWS finally supports the ability to enforce object ownership such that the owner of the bucket owns all objects. This adds support for that.

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

s3_bucket
ADDITIONAL INFORMATION



---
  - hosts: localhost
    tasks:
      - s3_bucket:
          name: tyler-test-123
          state: present

      - s3_bucket:
          name: tyler-test-123
          object_ownership: BucketOwnerEnforced
          state: present

      - s3_bucket:
          name: tyler-test-123
          state: absent

      - s3_bucket:
          name: tyler-test-123
          object_ownership: BucketOwnerEnforced
          state: present

      - s3_bucket:
          name: tyler-test-123
          state: absent
@Tyler-2 Tyler-2 deleted the add-object-ownership-enforcement branch March 30, 2022 14:34
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Oct 24, 2023
…s3_sync-integration-test

s3_sync: Integration test fix: empty buckets before deleting

SUMMARY

Added tasks to empty buckets before deleting them.
S3 requires a bucket to be empty before it can be deleted.
The integration tests in the s3_sync try to delete the buckets without emptying them.
Fixes ansible-collections#694.

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

tests/integration/targets/s3_sync

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Jill R <None>
Reviewed-by: None <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-3 PR should be backported to the stable-3 branch community_review feature This issue/PR relates to a feature request integration tests/integration mergeit Merge the PR (SoftwareFactory) module module new_contributor Help guide this first time contributor plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants